{template 'common/header'}
<!--<a style="margin-top:-15px; width:150px;" class="btn btn-primary col-lg-1" href="{php echo $this->createWebUrl('clearData');}" />一键清空测试数据</a>-->
<div class="main">
    <div class="panel panel-info">
	    <div class="panel-heading">参数设置</div>
	    <div class="panel-body">
            <form action="./index.php" method="post" class="form-horizontal" role="form" id="form1">
                <input type="hidden" name="c" value="site" />
                <input type="hidden" name="a" value="entry" />
                <input type="hidden" name="m" value="dashen_zaoqizhuanqian" />
                <input type="hidden" name="do" value="setting" />
                <div class="form-group">	                
		    		<label class="col-sm-2 control-label">客户端：</label>
		    		<div class="col-sm-10">
		    			<input class="form-control" readonly type="text" value="{php echo $_W['siteroot'].str_replace('./','app/',$this->createmobileurl('index'))}"/>
		    			<span class="help-block"></span>
		    		</div>
		   		</div>

				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" >开启手动转账</label>
					<div class="col-sm-9 col-xs-12">
						<input type="radio" name="zstate" value="1" {if $set['zstate'] == 1}checked{/if}> 开启
						<input type="radio" name="zstate" value="0" {if $set['zstate'] == 0}checked {/if}> 关闭
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" >开启倒计时</label>
					<div class="col-sm-9 col-xs-12">
						<input type="radio" name="djstate" value="1" {if $set['djstate'] == 1}checked{/if}> 开启
						<input type="radio" name="djstate" value="0" {if $set['djstate'] == 0}checked {/if}> 关闭
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" >开启余额可投资</label>
					<div class="col-sm-9 col-xs-12">
						<input type="radio" name="tzstate" value="1" {if $set['tzstate'] == 1}checked{/if}> 开启
						<input type="radio" name="tzstate" value="0" {if $set['tzstate'] == 0}checked {/if}> 关闭
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" >开启消息通知</label>
					<div class="col-sm-9 col-xs-12">
						<input type="radio" name="nostate" value="1" {if $set['nostate'] == 1}checked{/if}> 开启
						<input type="radio" name="nostate" value="0" {if $set['nostate'] == 0}checked {/if}> 关闭
					</div>
				</div>
				<div class="form-group">	                
		    		<label class="col-sm-2 control-label">自定义标题：</label>
		    		<div class="col-sm-10">
		    			<input class="form-control" type="text" value="{$set['titles']}" name="titles" placeholder="自定义标题"/>
		    			<span class="help-block">自定义标题，不填写则无标题</span>
		    		</div>
		   		</div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" >选择提现方式</label>
					<div class="col-sm-9 col-xs-12">
						<input type="checkbox" name="paychecked[]" value="1" {if $set['paychecked'] == 1 || $set['paychecked']==0 || $set['paychecked']==12}checked{/if} />支付宝
						<input type="checkbox" name="paychecked[]" value="2" {if $set['paychecked'] == 2 || $set['paychecked']==12}checked{/if} />银行卡
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">银行卡提现银行添加: </label>
					<div class="col-sm-10">
						<input type="text" name="txbank" value="{php echo $set['txbank']}" class="form-control" placeholder="" />
						<span class="help-block"><span style="color:red;">多个银行之间用英文,隔开</span></span>
					</div>
				</div>
		   		 <!--<div class="form-group">	                -->
		    		<!--<label class="col-sm-2 control-label">测试发放奖励金用户OPENID：</label>-->
		    		<!--<div class="col-sm-10">-->
		    			<!--<input type="text" name="user_openid" value="{php echo $set['user_openid']}" class="form-control" placeholder="填写微信openid" />-->
		    			<!--<span class="help-block">{php echo $_W['siteroot'].str_replace('./','app/',$this->createmobileurl('testsend'))}</span>-->
		    			<!--<span class="help-block">访问该网址，测试发放奖励金,测试发放金额1元</span>-->
		    		<!--</div>-->
		   		<!--</div>-->
				<div class="form-group">
					<label class="col-sm-2 control-label">管理员openid: </label>
					<div class="col-sm-10">
						<input type="text" name="user_openid" value="{php echo $set['user_openid']}" class="form-control" placeholder="手动分钱的管理员的openid" />
						<span class="help-block"><span style="color:red;">如果开启了手动分钱，请务必填写</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">公众号biz: </label>
					<div class="col-sm-10">
						<input type="text" name="biz_id" value="{php echo $set['biz_id']}" class="form-control" placeholder="公众号biz" />
						<span class="help-block"><span style="color:red;">引导关注时直接跳关注页面</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" >手动发放</label>
					<div class="col-sm-9 col-xs-12">
						<input type="radio" name="fstate" value="1" {if $set['fstate'] == 1}checked{/if}> 开启
						<input type="radio" name="fstate" value="0" {if $set['fstate'] == 0}checked {/if}> 关闭
					</div>
				</div>
                
                <div class="form-group">
	   				<label class="col-sm-2 control-label">扣除手续费比例: </label>
					<div class="col-sm-10">
						<input type="text" name="service" value="{php echo $set['service']}" class="form-control" placeholder="不填写或填写0,不扣手续费，扣0.1%填写0.1,扣5%填写5" />
						<span class="help-block"><span style="color:red;">百分比计算 如填写1，则扣除1%</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">提现扣除手续费比例: </label>
					<div class="col-sm-10">
						<input type="text" name="txsx" value="{php echo $set['txsx']}" class="form-control" placeholder="不填写或填写0,不扣手续费，扣0.1%填写0.1,扣5%填写5" />
						<span class="help-block"><span style="color:red;">百分比计算 如填写1，则扣除1%</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">封顶金额 </label>
					<div class="col-sm-10">
						<input type="number" name="fdje" value="{php echo $set['fdje']}" class="form-control" placeholder="不填写则不封顶" />
						<span class="help-block"><span style="color:red;">追加最多可以达到金额</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">邀请收益比例: </label>
					<div class="col-sm-10">
						<input type="text" name="bili" value="{php echo $set['bili']}" class="form-control" placeholder="不填写或填写0,不扣手续费，分0.1%填写0.1,分5%填写5" />
						<span class="help-block"><span style="color:red;">百分比计算 如填写1，则被邀请人投资时，邀请人获得投资额的1%</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" >邀请收益开启仅首次奖励</label>
					<div class="col-sm-9 col-xs-12">
						<input type="radio" name="ysstate" value="1" {if $set['ysstate'] == 1}checked{/if}> 开启
						<input type="radio" name="ysstate" value="0" {if $set['ysstate'] == 0}checked {/if}> 关闭
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">邀请数量</label>
					<div class="col-sm-10">
						<input type="number" name="personNum" value="{php echo $set['personNum']}" class="form-control" placeholder="不填写则不限制" />
						<span class="help-block"><span style="color:red;">邀请多少人了才能提现</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">邀请奖励金额</label>
					<div class="col-sm-10">
						<input type="number" name="invitation_money" value="{php echo $set['invitation_money']}" class="form-control" placeholder="不填写则不奖励" />
						<span class="help-block"><span style="color:red;">邀请一个人得多少钱</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">邀请奖励金额发放时间</label>
					<div class="col-sm-10">
						<input type="number" name="invitation_endtime" value="{php echo $set['invitation_endtime']}" class="form-control" placeholder="不填写默认为7天" />
						<span class="help-block"><span style="color:red;">发放到邀请人的余额</span></span>
					</div>
				</div>
				<div class="form-group">
	   				<label class="col-sm-2 control-label">打卡开始时间: </label>
					<div class="col-sm-10">
						<?php
						  $c=explode('.',$set['starttime']);
						  $d=$c[0].':'.($set['starttime']-$c[0])*60;
						  if($c[1]==0){
							 $d=$c[0].':'.'00';
							}
						?>
						<input type="text" name="starttime" {php echo $is_daka>0?'':''} value="{php echo $d}" class="form-control">
                        {if $is_daka>0}
                        <span class="help-block" style="color:red;">当前已有用户进行打卡，不能修改打卡开始时间</span>
                        {else}
						<span class="help-block">打卡开始时间，如上午5点填写5，下午5点填写17，不填写默认为上午5点(注:支持5:15,5:30,这类为15倍数的</span>
                        {/if}
					</div>
				</div>
				
				<div class="form-group">
	   				<label class="col-sm-2 control-label">打卡结束时间: </label>
					<div class="col-sm-10">
						<?php
						  $a=explode('.',$set['endtime']);
						  $b=$a[0].':'.($set['endtime']-$a[0])*60;
						   if($a[1]==0){
							 $b=$a[0].':'.'00';
							}
						?>
						<input type="text" name="endtime" {php echo $is_daka>0?'readonly':''} value="{php echo $b}" class="form-control">
                        {if $is_daka>0}
                        <span class="help-block" style="color:red;">当前已有用户进行打卡，不能修改打卡结束时间</span>
                        {else}
						<span class="help-block">打卡结束时间，如上午8点填写8，下午8点填写20，不填写默认为上午8点(注:支持5:15,5:30,这类为15倍数的)</span><span style="color:red;">*结束时间要大于开始时间</span>
                        {/if}
					</div>
				</div>
				
	   			<div class="form-group">
	   				<label class="col-sm-2 control-label">AppID(应用ID): </label>
					<div class="col-sm-10">
						<input type="text" name="appid" value="{php echo $set['appid']}" class="form-control">
						<span class="help-block">微信公众平台APPID</span>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label">AppSecret(应用密钥): </label>
					<div class="col-sm-10">
						<input type="text" name="appsecret" value="{php echo $set['appsecret']}" class="form-control">
						<span class="help-block">认证服务号secret</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">MCHID(商户号): </label>
					<div class="col-sm-10">
						<input type="text" name="mch_id" value="{php echo $set['mch_id']}" class="form-control">
						<span class="help-block">输入微信MCHID参数</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">PARTNERKEY(商户支付密钥32位): </label>
					<div class="col-sm-10">
						<input type="text" name="partnerkey" value="{php echo $set['partnerkey']}" class="form-control">
						<span class="help-block">商户支付密钥(API密钥)</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">商户支付证书: </label>
					<div class="col-sm-10">					

						<textarea name="cert" rows="5" class="form-control" placeholder="为保证安全性, 不显示证书内容. 若要修改, 请直接输入"></textarea>
						<span class="help-block">从商户平台上下载支付证书, 解压并取得其中的 apiclient_cert.pem 用记事本打开并复制文件内容, 填至此处</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">支付证书私钥: </label>
					<div class="col-sm-10">
						<textarea name="key" rows="5" class="form-control" placeholder="为保证安全性, 不显示证书内容. 若要修改, 请直接输入"></textarea>
						<span class="help-block">从商户平台上下载支付证书, 解压并取得其中的 apiclient_key.pem 用记事本打开并复制文件内容, 填至此处</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">支付根证书: </label>
					<div class="col-sm-10">
						<textarea name="rootca" rows="5" class="form-control" placeholder="为保证安全性, 不显示证书内容. 若要修改, 请直接输入"></textarea>
						<span class="help-block">从商户平台上下载支付证书, 解压并取得其中的 rootca.pem 用记事本打开并复制文件内容, 填至此处</span>
					</div>
				</div>
				<!--<div class="form-group">
					<label class="col-sm-2 control-label">服务器IP: </label>
					<div class="col-sm-10">
						<input type="text" name="ip" value="{php echo $set['ip']}" class="form-control">
						<span class="help-block">发放红包接口需要服务器IP. 程序将自动获取你的服务器IP, 如果获取失败, 请手动指定，这里填写你的服务器IP</span>
					</div>
				</div>-->
				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-10">
						<input style="margin-left:15px;" type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />
						<input type="hidden" name="token" value="{$_W['token']}" />
					</div>
				</div>
               
            </form>
	    </div>
	</div>
</div>

{template 'common/footer'}